<?php

namespace app\admin\controller;

use app\domain\admin\DashBoardDomain;
use think\response\Json;

class DashBoard extends Common
{
    public function dashboard(DashBoardDomain $domain): Json
    {
        try {
            $result = $domain->dashboard();
            return jsonReturn((bool)$result, lang($domain->errMsg), $result, $domain->statusCode);
        } catch (\Exception $e) {
            return jsonReturn(false, lang($e->getMessage()));
        }
    }
}